Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sync notification controller configmaps/secrets first #3075

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

zachaller
Copy link
Collaborator

@zachaller zachaller commented Oct 4, 2023

A bug was introduced with self service notifications that due to the addition of the add to informer events. This created a race condition on controller startup. We would end up populating our notification api map with an empty value because it could not find the configmap because the informer was synced after starting up of the rollout informer which called defaultEventf function to create the add to informer events.

This PR changes the order that informers are started and waits for the notification informers to sync before starting other informers.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@zachaller zachaller requested a review from leoluz October 4, 2023 21:22
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (20214b4) 81.73% compared to head (e6e322b) 81.71%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3075      +/-   ##
==========================================
- Coverage   81.73%   81.71%   -0.02%     
==========================================
  Files         134      134              
  Lines       20406    20406              
==========================================
- Hits        16678    16675       -3     
- Misses       2869     2871       +2     
- Partials      859      860       +1     
Files Coverage Δ
controller/controller.go 88.57% <40.00%> (-1.08%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

Go Published Test Results

2 045 tests   2 045 ✔️  2m 40s ⏱️
   118 suites         0 💤
       1 files           0

Results for commit e6e322b.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

E2E Tests Published Test Results

    4 files      4 suites   3h 29m 49s ⏱️
102 tests   89 ✔️   6 💤   7
424 runs  385 ✔️ 24 💤 15

For more details on these failures, see this check.

Results for commit e6e322b.

Copy link
Contributor

@leoluz leoluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zachaller zachaller merged commit 83fe979 into master Oct 5, 2023
25 of 26 checks passed
@zachaller zachaller deleted the fix-self-service-notifications branch October 5, 2023 14:14
zachaller added a commit that referenced this pull request Oct 5, 2023
sync notification controller configmaps/secrets first before starting other informers

Signed-off-by: zachaller <[email protected]>
@zachaller zachaller added the cherry-pick-completed Used once we have cherry picked the PR to all requested releases label Oct 5, 2023
phclark pushed a commit to phclark/argo-rollouts that referenced this pull request Oct 13, 2023
…3075)

sync notification controller configmaps/secrets first before starting other informers

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Philip Clark <[email protected]>
phclark pushed a commit to phclark/argo-rollouts that referenced this pull request Oct 15, 2023
…3075)

sync notification controller configmaps/secrets first before starting other informers

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Philip Clark <[email protected]>
phclark pushed a commit to phclark/argo-rollouts that referenced this pull request Oct 15, 2023
…3075)

sync notification controller configmaps/secrets first before starting other informers

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Philip Clark <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/release-1.6 cherry-pick-completed Used once we have cherry picked the PR to all requested releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants